package com.whfc.emp.service;

import com.whfc.common.result.PageData;
import com.whfc.emp.entity.AppEntryApplication;
import com.whfc.entity.dto.Apply.rep.EntryApplicationListRep;
import com.whfc.entity.dto.Apply.rep.QueryIdNameRep;
import com.whfc.entity.dto.Apply.req.*;
import com.whfc.fuum.entity.SysUser;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * @Description  人员入场申请
 * @Author xjy
 * @Date 2025/9/13 10:31
 * @Version 1.0
 */
public interface AppEntryApplicationService {

    AppEntryApplicationDTO saveApply(Integer id, AppEntryApplicationDTO appEntryApplication);

    List<SafetyTrainingExamReq> queryPersonnel(QueryPersonnelReq req);

    List<UserDeptDTO> queryMessage(String phone);

    int updateApprovalResult(AppEntryApplication application);

    List<AppEntryApplication> selectByCreator(Integer userId);

    AppEntryApplication selectByPrimaryKey(Integer id);

    List<SafetyTrainingExamReq> getEntryPerson(List<Integer> entryPersonId);

    List<QueryIdNameRep> getIdName(List<Integer> entryPersonId);

    PageData<EntryApplicationListRep> getAppEntryList(SysUser user,AppEntryApplicationReq request);

    void edit(AppUpEntryApplicationDTO req);

    List<AppEntryApplication> selectByCreateUser(String createUserId);

    /**
     * 根据时间范围和审核状态查询入场申请
     */
    PageData<AppEntryApplication> selectByTimeAndStatus(List<Integer> pidList, Integer createUserId, LocalDateTime entryTimeBegin, LocalDateTime entryTimeEnd,
                                                    LocalDateTime leaveTimeBegin, LocalDateTime leaveTimeEnd, Integer auditStatus, Integer pageNum, Integer pageSize);

}
